Rukey.Ajax.send("comment_list.php?id="+pic_id+"&t="+new Date().valueOf(),"GET",function(data){
	Rukey.getObj("commentList").innerHTML=data;
});
function changeCommentPage(id,page){
	var url="comment_list.php?id="+id+"&page="+page;
	Rukey.Ajax.send(url,"GET",function(data){
		Rukey.getObj("commentList").innerHTML=data;
	});
}
var form=document.picComment;
form.onsubmit=function(){
	(function(){
		var writer=Rukey.getObj("writer");
		var email=Rukey.getObj("email");
		var comment=Rukey.getObj("comment");
		writer.onfocus=email.onfocus=comment.onfocus=function(){
			this.className="";
		}
	})();
	var writer=form.writer.value;
	var email=form.email.value;
	var url=form.url.value;
	var comment=form.comment.value;
	if(Rukey.isNull(writer)){
		alert("称呼不能为空");
		form.writer.className="warning";
		return false;
	}
	if(Rukey.isNull(email)){
		alert("邮箱不能为空");
		form.email.className="warning";
		return false;
	}else if(!Rukey.isEmail(email)){
		alert("邮箱不能乱填哦");
		form.email.className="warning";
		return false;
	}
	if(Rukey.isNull(comment)){
		alert("内容不能为空");
		form.comment.className="warning";
		return false;
	}
	Rukey.Ajax.send(form.action,"POST",{submit:1,writer:writer,email:email,url:url,comment:comment},function(data){
		if(data=="ok"){
			Rukey.Ajax.send("comment_list.php?id="+pic_id+"&t="+new Date().valueOf(),"GET",function(data2){
				form.comment.value="";
				Rukey.getObj("commentList").innerHTML=data2;
				location.hash="commentHead";
				Rukey.getObj("commentCount").innerHTML=parseInt(Rukey.getObj("commentCount").innerHTML)+1;
				
			});
		}else{
			alert(data);
		}
	});
	return false;
};